package com.panshi.utils;

import java.util.Random;
import java.util.regex.Pattern;

public class RandomCodeUtil {


//    static String str = "ABCDEFGHIJKLMNOPQRSTUVWXWZabcdefghijklmnopqrstuvwxwz1234567890";
    static String str = "1234567890";

   public static String create(int len){
        StringBuilder sb  = new StringBuilder();
       for (int i = 0; i <len ; i++) {
           sb.append(str.charAt(new Random().nextInt(str.length())));
       }
       return sb.toString();
   }

    public static void main(String[] args) {
        for (int i = 0; i <100 ; i++) {

           // System.out.println(RandomCodeUtil.create(6));

        }
    }

}
